package zz;

import java.util.Scanner;

import zz.J03_MemberDAO;
import zz.J03_MemberVO;

public class J03_MemberId implements J03_IMemberIdPwd{
	Scanner sc = new Scanner(System.in);
	private J03_MemberDAO mdao = new J03_MemberDAO();
	@Override
	public void readmember() {
		String name = sc.next();
		
		for(J03_MemberVO m : mdao.selectMember()){
			
			if(name.equals(m.getName())){
				String email = sc.next();
				if(email.equals(m.getEmail())){
					System.out.println("고객님의 아이디는   " + m.getUserid() + "   입니다."); break;
				}else System.out.println("이메일이 맞지 않습니다."); break;
			}else System.out.println("이름이 맞지 않습니다."); break;
	}
	}
}